package com.sch.study.base.StringTest;

/**
 * User: hui_stone
 * Date: 2016/3/13 0013
 * Time: 下午 19:04
 */
public class Test {

    public static void stringReplace(String text){
        text = text.replace('j','i');
    }

    public static void bufferReplace(StringBuffer text){
        text = text.append("C");
    }

    public static void main(String[] args) {

        String textString = new String("java");
        StringBuffer textBuffer = new StringBuffer("java");
        stringReplace(textString);
        bufferReplace(textBuffer);
        System.out.println(textString+textBuffer);
    }
}
